package cn.lijigou.shopping.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author 赵奇 E-mail:cagezhao@gmail.com
 * @version 创建时间：2012-5-2 上午11:06:25 类说明
 */

public class GetSingleThreadPool {

	private static ExecutorService instance = null;
	
	/**
	 * 私有构造方法，避免外部创建实例
	 */
	private GetSingleThreadPool(){
		
	}

	public static synchronized ExecutorService getInstance() {
		if (instance == null) {
			instance = Executors.newCachedThreadPool();
		}
		return instance;
	}
}
